Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDISCROWD-6284 Block database details from API response #868

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

peterkle
Copy link

Issue number of the reported bug or feature request: #RDISCROWD-6284

Describe your changes
This fixes a bug when passing unsupported or invalid parameters to the API results in displaying database/backend details to the client.

Testing performed
Unit tests

Additional context
The underlying exception thrown for an invalid query string is:
sqlalchemy.exc.DataError: (psycopg2.errors.InvalidTextRepresentation)
So, instead of returning the DataError exception message, we print out a more general message.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5718950225

  • 5 of 5 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 94.128%

Totals Coverage Status
Change from base Build 5718502827: 0.001%
Covered Lines: 16929
Relevant Lines: 17985

💛 - Coveralls

Copy link

@ciaracian ciaracian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me - gettext is a nice touch i hadn't seen before. Thanks!

@peterkle peterkle merged commit e68add7 into main Aug 2, 2023
4 checks passed
@peterkle peterkle deleted the RDISCROWD-6284 branch August 2, 2023 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants